<template>
  <div class="progress-container">
    <div class="progress-bar" :style="{ width: `${progress}%` }"></div>
    <span class="progress-text">{{ progress }}%</span>
  </div>
</template>

<script lang="ts" setup>
defineProps<{
  progress: number;
}>();
</script>

<style scoped lang="less">
.progress-container {
  position: relative;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;

  .progress-bar {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease;
  }

  .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 0.8em;
    font-weight: bold;
  }
}
</style>